package com.backend.romimgview.service.impl;

import java.util.List;

import com.backend.apartment.domain.Image;
import com.backend.room.domain.Room;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.backend.romimgview.mapper.RomimgViewMapper;
import com.backend.romimgview.domain.RomimgView;
import com.backend.romimgview.service.IRomimgViewService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 房间图片管理Service业务层处理
 * 
 * @author fusi
 * @date 2024-10-06
 */
@Service
public class RomimgViewServiceImpl implements IRomimgViewService {
    @Autowired
    private RomimgViewMapper romimgViewMapper;

    @Override
    public RomimgView selectRomimgViewByImageRoomId(Long imageRoomId) {
        return romimgViewMapper.selectRomimgViewByImageRoomId(imageRoomId);
    }

    @Override
    public List<RomimgView> selectRomimgViewList(RomimgView romimgView) {
        return romimgViewMapper.selectRomimgViewList(romimgView);
    }

    @Override
    public Room selectRoomByRoomId(Long roomId) {
        return romimgViewMapper.selectRoomByRoomId(roomId);
    }

    @Override
    public Image selectImageByImageId(Long imageId) {
        return romimgViewMapper.selectImageByImageId(imageId);
    }

    @Override
    public int insertRomimgView(RomimgView romimgView) {
        return romimgViewMapper.insertImageRoom(romimgView);
    }

    @Override
    public int updateRomimgView(RomimgView romimgView) {
        return romimgViewMapper.updateImageRoom(romimgView);
    }

    @Override
    public int deleteRomimgViews(Long[] imageRoomIds) {
        return romimgViewMapper.deleteRomimgViewByImageRoomIds(imageRoomIds);
    }
}
